<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="<%=request.getContextPath()%>/css/pc/login.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<%=request.getContextPath()%>/js/pc/jquery-1.9.1.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>重置密码</title>
</head>
<body>
<input type="hidden" id="uid" value="${uid}"/>
       <!--
        	作者：offline
        	时间：2016-12-28
        	描述：重置
        -->
        <div class="login5">
        	<div class="login5_div1"><img src="<%=request.getContextPath()%>/images/pc/logos_01.jpg" /></div>
        	<img class="login5_img1" src="<%=request.getContextPath()%>/images/pc/login_04.jpg" />
        	<div class="page_divs" id="reminder_news"></div>
        	<input class="login5_in1" type="password" placeholder="新密码" id="password_news" value=""/>
        	<input class="login5_in2" type="password" placeholder="确认密码" id="pwd_confirm" value=""/>
        	<input class="login5_in3" type="button" value="重置" onclick="submitViewByReset()"/>
        </div>
      
</body>
<script type="text/javascript">
	//登录提交验证
	function submitViewByReset(){
		  var password_news=$("#password_news").val();
		  var pwd_confirm=$("#pwd_confirm").val();
		   if(password_news==""){
			  $("#reminder_news").html("请输入新密码");
			  $("#password_news").focus();
			  return false;
		  }else if(password_news.length>20){
			  $("#reminder_news").html("密码长度太长（20字符内）");
			  $("#password_news").focus();
			  return false;
		  }else  if(pwd_confirm==""){
			  $("#reminder_news").html("请输入确认密码");
			  $("#pwd_confirm").focus();
			  return false;
		  }else if(pwd_confirm!=password_news){
			  $("#reminder_news").html("两次密码不一致");
			  $("#pwd_confirm").focus();
			  return false;
		  }else{ 
			  var uid=$("#uid").val();
				//提交
				document.write('<form action="<%=request.getContextPath()%>/login/resetpwd.htm" method="post" name="formx1" style="display:none">');
				document.write('<input type="hidden" name="pwd" value="'+password_news+'"/>');
				document.write('<input type="hidden" name="uid" value="'+uid+'"/>');
				document.write("</form>");
				document.formx1.submit();
				  
			  }
	}
	 
</script>
</html>